---
layout: "default"
title: "DictionaryLiteralConvertible"
description: "Swift documentation for 'DictionaryLiteralConvertible': Conforming types can be initialized with dictionary literals."
keywords: "DictionaryLiteralConvertible,protocol,swift,documentation,Key,Value"
root: "/v1.2"
---

<div class="intro-declaration"><code class="language-swift">protocol DictionaryLiteralConvertible</code></div>

<div class="discussion comment">
    <p>Conforming types can be initialized with dictionary literals</p>
</div>

<table class="standard">
<tr>
<th id="inheritance">Inheritance</th>
<td>
<span class="viz"><a href="hierarchy/">View Protocol Hierarchy &rarr;</a></span>
</td>
</tr>

<tr>
<th id="aliases">Associated Types</th>
<td>
<span id="aliasesmark"></span>
<div class="declaration">
<code class="language-swift">Key</code>
</div>
<div class="declaration">
<code class="language-swift">Value</code>
</div>
</td>
</tr>


<tr>
<th>Import</th>
<td><code class="language-swift">import Swift</code></td>
</tr>

</table>


<h3>Initializers</h3>
<div class="declaration" id="init-dictionaryliteral_">
<a class="toggle-link" data-toggle="collapse" href="#comment-init-dictionaryliteral_">init(<wbr>dictionaryLiteral:)</a> <span class="required">Required</span><div class="comment collapse" id="comment-init-dictionaryliteral_"><div class="p">
    <p>Create an instance initialized with <code>elements</code>.</p>

    <h4>Declaration</h4>    
    <code class="language-swift">init(dictionaryLiteral elements: (Key, Value)...)</code>

    </div></div>
</div>







